import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("dictionary_item", { schema: "charge" })
export class DictionaryItem {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("varchar", { name: "name", length: 30 })
  name: string;

  @Column("varchar", { name: "code", length: 20 })
  code: string;

  @Column("int", { name: "parent_id", default: () => "'0'" })
  parentId: number;

  @Column("int", { name: "category_id", default: () => "'0'" })
  categoryId: number;
}
